package com.leyu.mall.service.store.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.leyu.mall.dao.store.StoreBaseMapper;
import com.leyu.mall.domain.store.StoreBase;
import com.leyu.mall.service.store.IStoreBaseService;
@Service
@Transactional(rollbackFor = Exception.class)
public class StoreBaseServiceImpl implements IStoreBaseService {
	
	@Resource(name = "storeBaseMapper")
	private StoreBaseMapper storeBaseMapper;


	@Override
	public List<StoreBase> getAllStoreBase() throws Exception {
		// TODO Auto-generated method stub
		
		return this.storeBaseMapper.getAllStoreBase();
	}

	@Override
	public StoreBase getStoreBaseById(Long storeId) throws Exception {
		// TODO Auto-generated method stub
		return this.storeBaseMapper.getStoreBaseById(storeId);
	}

	@Override
	public void deleteStoreBase(Long storeId) throws Exception {
		// TODO Auto-generated method stub
		this.storeBaseMapper.deleteByPrimaryKey(storeId);

	}

	@Override
	public void save(StoreBase entity) throws Exception {
		// TODO Auto-generated method stub
		this.storeBaseMapper.addStoreBase(entity);

	}

}
